<template>
	<view class="myinput">
		<view class="m_header_top">
			<my-top @back='back' title="修改昵称"   :isback="true" :isline='true'>
				<template slot="quit">
					<view class="quits">取消</view>
				</template>
				<template slot="save" >
					<view class="submittop" @click='submit'>
						确定
					</view>
				</template>
			</my-top>
		</view>
		<view class="inputBox">
			<input :focus="true" type="text" placeholder="请输入名字" v-model="userdata.name" />
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userdata:{
					name:'',
					url:''
				}
			};
		},
		onLoad(e) {
			console.log(e)
			this.userdata = JSON.parse(e.data) 
		},
		methods: {
			submit(){
				console.log('qued',this.userdata)
				uni.redirectTo({
					url:this.userdata.url +'?name=' + this.userdata.name
				})
			},
			back() {
				uni.navigateBack({
					delta:1
				})
			},

		}
	}
</script>

<style lang="scss" scoped>
	.myinput {

		.inputBox {
			border-radius: 5rpx;
			display: flex;
			align-items: center;
			height: 98rpx;
			padding: 0 16rpx;
			// width: 100%;
			margin: 0 16rpx;
			background-color: #FFFFFF;
			input{
				height: 45rpx;
				font-size: 32rpx;
				font-family: PingFang SC;
				font-weight: 500;
				line-height: 54rpx;
				color: #333333;
				opacity: 1;

			}
		}

		.quits {
			width: 68rpx;
			height: 48rpx;
			font-size: 30rpx;
			font-family: PingFang SC;
			font-weight: 500;
			line-height: 54rpx;
			color: #999999;
			opacity: 1;

		}

		.submittop {
			width: 132rpx;
			height: 60rpx;
			border-radius: 30rpx;
			background-color: rgba(4, 161, 251, 1);
			text-align: center;
			line-height: 60rpx;
			color: #FFFFFF;
			font-size: 34rpx;
			font-family: PingFang SC;
			font-weight: 500;
		}
	}
</style>
